package com.qf.controller;

import com.qf.dto.R;
import com.qf.entity.SysRoleMenuKey;
import com.qf.service.RoleMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author ztf
 * @Date 20:10 2022/1/10
 **/
@RestController
@RequestMapping("rolemenu")
public class RoleMenuController {
    private RoleMenuService roleMenuService;

    @Autowired
    public void setRoleMenuService(RoleMenuService roleMenuService) {
        this.roleMenuService = roleMenuService;
    }

    @PostMapping("addrolemenu")
    public R addRoleMenu(@RequestBody SysRoleMenuKey roleMenuKey){
        roleMenuService.addRoleMenu(roleMenuKey);
        return R.setOK();
    }

}
